home *** CD-ROM | disk | FTP | other *** search
- @echo off
- setlocal enableextensions
- ::
- :: Remove all traces of the PCPitstop2 ActiveX control and optionally install a new control
- :: Version 2.12 (07/20/2008)
- ::
- echo .
- echo . Ready to remove the PCPitstop2 ActiveX control. If there is a new
- echo . copy of PCPitstop2.dll on the desktop it will be installed.
- echo .
- echo . NOTE: On Windows Vista, this file must be run as Administrator.
- echo . (Right-click the file and select "Run as Administrator".)
- echo .
- echo . Close all copies of Internet Explorer or Optimize and press Enter.
- echo . To cancel, press Ctrl-C.
- echo .
- pause
-
- :: Registry key abbreviation
- set LMCV=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
- :: Full path to Downloaded Program Files
- set dpf=%systemroot%\Downloaded Program Files
- :: All DLLs bundled with PCPitstop2.dll at any point
- set dlls=PCPitstop2.dll
- :: CLSID and Typelib for PCPitstop2.Exam root object
- set cexam=FFB3A759-98B1-446F-BDA9-909C6EB18CC7
- set texam=D928BAFC-11CD-4230-96EB-D58BE7240CF1
- :: RegSvr32 command to unregister an ActiveX control silently
- set rs32="%systemroot%\system32\regsvr32.exe" /u /s
-
- :: If there is a PCPitstop2.dll in this directory, copy it to the DPF location
- if not exist "%UserProfile%\Desktop\PCPitstop2.dll" goto NOFILE
- echo Copying new PCPitstop2 ActiveX control
- copy "%UserProfile%\Desktop\PCPitstop2.dll" "%dpf%\PCPitstop2.new"
- :NOFILE
-
- :: Switch to the DPF folder to do the work
- %systemdrive%
- cd "%dpf%"
-
- :: Unregister PCPitstop2 ActiveX controls found in DPF and the CONFLICT directories
- for /D %%s in ( . conflict.* ) do for %%d in ( %dlls% ) do if exist "%%s\%%d" %rs32% "%%s\%%d" & del "%%s\%%d"
-
- :: Delete any leftover registry values that track the files or ActiveX objects; throw away spurious warnings about no key found
- for %%d in ( %dlls% ) do reg delete "%LMCV%\ModuleUsage\%SystemRoot:\=/%/Downloaded Program Files/%%d" /F 2>nul:
- for /D %%s in ( conflict.* ) do for %%d in ( %dlls% ) do reg delete "%LMCV%\ModuleUsage\%SystemRoot:\=/%/Downloaded Program Files/%%s/%%d" /F 2>nul:
- for %%d in ( %dlls% ) do reg delete "%LMCV%\SharedDLLs" /V "%dpf%\%%d" /F 2>nul:
- for /D %%s in ( conflict.* ) do for %%d in ( %dlls% ) do reg delete "%LMCV%\SharedDLLs" /V "%dpf%\%%s\%%d" /F 2>nul:
- for %%d in ( %dlls% ) do reg delete "HKCR\AppID\%%d" /F 2>nul:
- reg delete "HKCR\CLSID\{%cexam%}" /F 2>nul:
- reg delete "HKCR\Typelib\{%texam%}" /F 2>nul:
- reg delete "HKLM\SOFTWARE\Microsoft\Code Store Database\Distribution Units\{%cexam%}" /F 2>nul:
-
- :: Remove the IE kill bits in case they somehow got set (e.g., through IE Tools/Manage Add-Ons)
- reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\Settings\{%cexam%}" /F 2>nul:
-
- :: Do the same for 64-bit systems; this won't hurt 32-bit since all these keys just don't exist
- set LMCV=HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion
- for %%d in ( %dlls% ) do reg delete "%LMCV%\ModuleUsage\%SystemRoot:\=/%/Downloaded Program Files/%%d" /F 2>nul:
- for /D %%s in ( conflict.* ) do for %%d in ( %dlls% ) do reg delete "%LMCV%\ModuleUsage\%SystemRoot:\=/%/Downloaded Program Files/%%s/%%d" /F 2>nul:
- for %%d in ( %dlls% ) do reg delete "%LMCV%\SharedDLLs" /V "%dpf%\%%d" /F 2>nul:
- for /D %%s in ( conflict.* ) do for %%d in ( %dlls% ) do reg delete "%LMCV%\SharedDLLs" /V "%dpf%\%%s\%%d" /F 2>nul:
- reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Code Store Database\Distribution Units\{%cexam%}" /F 2>nul:
-
- :: Clear the IE cache; works for IE7 but generates an entry point dialog error for IE6
- rundll32 inetcpl.cpl,ClearMyTracksByProcess 8
-
- :: Register the new dll
- if not exist PCPitstop2.new goto NOREGISTER
- echo Installing new PCPitstop2 ActiveX control
- if exist PCPitstop2.dll del PCPitstop2.dll
- ren PCPitstop2.new PCPitstop2.dll
- "%systemroot%\system32\regsvr32.exe" PCPitstop2.dll
- :NOREGISTER
-
-
- echo .
- echo . PCPitstop2 ActiveX control removal/update complete.
- echo .
- echo . If you saw a dialog "Missing entry: ClearMyTracksByProcess" it means the
- echo . system is running IE6; please clear your IE cache before continuing.
- echo . (In IE6, Tools, Internet Options, General tab, Delete Files.)
- echo .
- echo . If a new control was not installed at this time, one will be installed
- echo . the next time you use a PC Pitstop product or service that requires it.
- echo .
- pause
-
-